package com.mengdie.shuidi.ui.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mengdie.shuidi.R;
import com.mengdie.shuidi.model.NewLineMode;
import com.mengdie.shuidi.utils.common.ScreenUtils;

import java.util.List;

/**
 * Created by apple on 16/10/14.
 */

public class CityAdapter extends BaseQuickAdapter<NewLineMode.RetDataBean.ServListBean,BaseViewHolder> {

    public CityAdapter(List<NewLineMode.RetDataBean.ServListBean> data) {
        super(R.layout.item_city, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, NewLineMode.RetDataBean.ServListBean item) {


        holder.setText(R.id.tv_ctiy, item.getName());
        TextView textView = holder.getView(R.id.tv_ctiy);
        int screenWidth = ScreenUtils.getScreenWidth(mContext);

//        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
//        params.setMargins(5,0,5,0);
//        textView.setLayoutParams(params);


    }
}
